//CollectionMap.java
package com.xyc.ch8;
import java.util.*;

public class CollectionMap{
   public static void main(String[] args)  {
	   Collection c1=new ArrayList();
	   c1.add(new Integer(1));
	   c1.add(new Integer(1));
	   c1.add(new Integer(2));

	   Collection c2=new HashSet();
	   c2.add(new Integer(1));
	   c2.add(new Integer(1));
	   c2.add(new Integer(2));

	   Map m=new HashMap();
	   m.put("1","One");
	   m.put("1","First");
	   m.put("2","Second");

	   System.out.println (c1);
	   System.out.println (c2);
	   System.out.println (m);
   }
}









